package com.atguigu.spzx.common.interceptor;

import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author LT
 * @create 2023-11-20-18:24
 */
@Configuration
public class SpzxUserWebConfigurer implements WebMvcConfigurer {

    @Resource
    SpzxUserInterceptor spzxUserInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(spzxUserInterceptor).addPathPatterns("/api/**/auth/**");
    }
}
